package main.Q2301_2400;

public class Q2381_2390 {
    public static void main(String[] args) {
        System.out.println("Question2381：");
        System.out.println("Question2382：");
        System.out.println("Question2383：");
        System.out.println("Question2384：");
        System.out.println("Question2385：");
        System.out.println("Question2386：");
        System.out.println("Question2387：");
        System.out.println("Question2388：");
        System.out.println("Question2389：");
        System.out.println("Question2390：从字符串中移除星号");
    }
}

class Question2390 {
    public String removeStars(String s) {
        StringBuffer stringBuffer = new StringBuffer();
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == '*') {
                stringBuffer = stringBuffer.deleteCharAt(stringBuffer.length() - 1);
            } else {
                stringBuffer = stringBuffer.append(s.charAt(i));
            }
        }
        return stringBuffer.toString();
    }
}